#!/bin/sh

# 复制项目的文件到对应docker路径，便于一键生成镜像。
usage() {
	echo "Usage: sh copy.sh"
	exit 1
}


# copy sql
echo "begin copy sql "
cp ../sql/ry_20210908.sql ./mysql/db
cp ../sql/ry_config_20220114.sql ./mysql/db

# copy html
echo "begin copy html "
cp -r ../haoniu-ui/dist/** ./nginx/html/dist


# copy jar
echo "begin copy haoniu-gateway "
cp ../haoniu-gateway/target/haoniu-gateway.jar ./haoniu/gateway/jar

echo "begin copy haoniu-auth "
cp ../haoniu-auth/target/haoniu-auth.jar ./haoniu/auth/jar

echo "begin copy haoniu-visual "
cp ../haoniu-visual/haoniu-monitor/target/haoniu-visual-monitor.jar  ./haoniu/visual/monitor/jar

echo "begin copy haoniu-modules-system "
cp ../haoniu-modules/haoniu-system/target/haoniu-modules-system.jar ./haoniu/modules/system/jar

echo "begin copy haoniu-modules-file "
cp ../haoniu-modules/haoniu-file/target/haoniu-modules-file.jar ./haoniu/modules/file/jar

echo "begin copy haoniu-modules-job "
cp ../haoniu-modules/haoniu-job/target/haoniu-modules-job.jar ./haoniu/modules/job/jar

echo "begin copy haoniu-modules-gen "
cp ../haoniu-modules/haoniu-gen/target/haoniu-modules-gen.jar ./haoniu/modules/gen/jar

